package com.cin.cma.server.pos.service.impl;

import com.cin.cma.common.model.finixx.base.BaseRequest;
import com.cin.cma.common.model.finixx.response.DataInfSoftwateVersionResponse;
import com.cin.cma.common.constant.FunctionCode;
import com.cin.cma.server.pos.common.extension.ErrorValid;
import com.cin.cma.server.pos.service.IDataInfService;
import com.cin.cma.server.pos.service.IProxyRequestService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 *
 * @Date：2024-07-18 14:44
 */
@Slf4j
@Service
public class DataInfServiceImpl implements IDataInfService {
    @Autowired
    private ErrorValid errorValid;
    @Autowired
    private IProxyRequestService proxyRequestService;

    /**
     * 获取接口版本号
     *
     * @param model
     * @return
     */
    @Override
    public DataInfSoftwateVersionResponse getSoftwareVersion(BaseRequest model) throws Exception {
        model.setCode(FunctionCode.DATAINF_SOFTWARE_VERSION);
        return this.proxyRequestService.context(model, DataInfSoftwateVersionResponse.class);
    }
}
